# 最大乘积子序列的值，暴力
def force(array):
    mares = 0
    for i in range(len(array)):
        for j in range(i+1, len(array)):
            a = multi(array, i, j)
            if a > mares:
                mares = a
    return mares


def multi(array, start, end):
    res = 1
    for i in range(start, end+1):
        res *= array[i]
    return res


if __name__ == '__main__':
    print(force([2, 3, -2, 4]))

